package com.mask.im.business.strategy.impl.context;

import com.mask.im.business.enums.SendCodeStrategyEnum;
import com.mask.im.business.strategy.SendCodeStrategy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;


@Service
public class SendCodeStrategyContext {

	@Autowired
	private Map<String , SendCodeStrategy> hashMap;

	public void executeStrategySendCode(String type,String account){
		hashMap.get(SendCodeStrategyEnum.getStrategy(type)).sendCode(account);
	}
}
